import * as React from "react";
const { useState } = React;

const MemoComponent = React.memo(function Test(props) {
  return <h1>{props.count}</h1>;
});

const WrapperComponent = () => {
  const [count, setCount] = useState(0);
  return (
    <div>
      <h1 onClick={() => setCount(prevCount => prevCount + 1)}>{count}</h1>
      <MemoComponent count={1} />
    </div>
  );
};

export default WrapperComponent;
